home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / GRAPHICS / RAYTRACING / POVRAY3 / POV301 / povray3 / povscn / level2 / pov / soft < prev    next >
Text File  |  1995-11-08  |  3KB  |  131 lines

  1. // Persistence Of Vision raytracer version 3.0 sample file.
  2. // Demo of extended light sources by Steve Anger
  3.  
  4. #version 3.0
  5. global_settings { assumed_gamma 1.0 }
  6.  
  7. #include "colors.inc"
  8. #include "textures.inc"
  9. #include "shapes.inc"
  10.  
  11.  
  12. // A rather boring texture but it renders quick
  13. #declare Text_Texture = texture {
  14.    pigment { Red }
  15.    finish {
  16.       phong 2.0
  17.       phong_size 80
  18.       ambient 0.1
  19.       diffuse 1.5
  20.    }
  21. }
  22.  
  23. #declare Letter_S = union {
  24.     difference {
  25.        torus { 4.0, 1.5 rotate 90*x }
  26.        box { <0, -5.5, -1.5>, <5.5, 0, 1.5> }
  27.  
  28.        translate 4*y
  29.     }
  30.  
  31.     difference {
  32.        torus { 4.0, 1.5 rotate 90*x }
  33.        box { <-5.5, 0, -1.5>, <0, 5.5, 1.5> }
  34.  
  35.        translate -4*y
  36.     }
  37.  
  38.     sphere { <4, 4, 0>, 1.5 }
  39.     sphere { <-4, -4, 0>, 1.5 }
  40.  
  41. }
  42.  
  43. #declare Letter_O = union {
  44.     torus { 4.0, 1.5
  45.         rotate 90*x
  46.  
  47.         clipped_by { box { <-5.5, 0, -1.5> <5.5, 5.5, 1.5> } }
  48.         translate 4*y
  49.     }
  50.  
  51.     torus { 4.0, 1.5
  52.         rotate 90*x
  53.  
  54.         clipped_by { box { <-5.5, -5.5, -1.5> <5.5, 0, 1.5> } }
  55.         translate -4*y
  56.     }
  57.  
  58.     cylinder { <-4, -4, 0>, <-4, +4, 0>, 1.5 }
  59.     cylinder { <+4, -4, 0>, <+4, +4, 0>, 1.5 }
  60.  
  61. }
  62.  
  63. #declare Letter_F = union {
  64.     cylinder { <-4, -8, 0>, <-4, 8, 0>, 1.5 }
  65.     cylinder { <-4, 0, 0>, <1.5, 0, 0>, 1.5 }
  66.     cylinder { <-4, 8, 0>, <4, 8, 0>, 1.5 }
  67.  
  68.     sphere { <-4, -8, 0>, 1.5 }
  69.     sphere { <-4, 8, 0>, 1.5 }
  70.     sphere { <4, 8, 0>, 1.5 }
  71.     sphere { <1.5, 0, 0>, 1.5 }
  72.  
  73. }
  74.  
  75. #declare Letter_T = union {
  76.     cylinder { <0, -8, 0>, <0, 8, 0>, 1.5 }
  77.     cylinder { <-4, 8, 0>, <4, 8, 0>, 1.5 }
  78.  
  79.     sphere { <-4, 8, 0>, 1.5 }
  80.     sphere { <+4, 8, 0>, 1.5 }
  81.     sphere { <0, -8, 0>, 1.5 }
  82.  
  83. }
  84.  
  85.  
  86. // Put the letters together
  87. union {
  88.     object { Letter_S  translate -20*x }
  89.     object { Letter_O  translate  -7*x }
  90.     object { Letter_F  translate   7*x }
  91.     object { Letter_T  translate  20*x }
  92.  
  93.     texture { Text_Texture }
  94.  
  95.     translate 9.5*y
  96. }
  97.  
  98. // Floor
  99. plane { y, 0
  100.     pigment { Tan }
  101.     finish {
  102.         ambient 0.0
  103.         diffuse 0.8
  104.     }
  105. }
  106.  
  107. // Something to light the front of the text
  108. light_source { <0, 30, -90> color Gray30 }
  109.  
  110. // An extended area spotlight to backlight the letters
  111. light_source {
  112.    <0, 50, 100> color White
  113.  
  114.    // The spotlight parameters
  115.    spotlight
  116.    point_at <0, 0, -5>
  117.    radius 6
  118.    falloff 22
  119.  
  120.    // The extended area light paramaters
  121.    area_light <6, 0, 0>, <0, 6, 0>, 9, 9
  122.    adaptive 0
  123.    jitter
  124. }
  125.  
  126. camera {
  127.     direction <0, 0, 1.5>
  128.     location <0, 30, -90>
  129.     look_at <0, 0, -2>
  130. }
  131.